type Concat<T extends unknown[], U extends unknown[]> = [...T,...U]

//js

function Concat(arrA:any[],arrB:any[]){
    return [...arrA,...arrB]
}

// infer spread
//first [1,2,3]-> 1
//tail [1,2,3]-> 3

// type GetFirst<T extends unknown[]> = T extends [infer First, ...infer Rest]?First:never;
// type GetTail<T extends unknown[]> =  [undefined,...T]extends [infer First, ...infer Rest,infer Tail]?Tail:never;

// type t = GetTail<[1,2,3]>
// type tt = GetFirst<[1,2,3]>